home *** CD-ROM | disk | FTP | other *** search
- Path: quadostimpy.natinst.com!user
- From: rcauvin@natinst.com (Roger L. Cauvin)
- Newsgroups: comp.lang.c++
- Subject: Re: pow(-1,1.1) = DOMAIN error
- Date: 22 Feb 1996 16:26:34 GMT
- Organization: National Instruments
- Message-ID: <rcauvin-1102961030180001@quadostimpy.natinst.com>
- References: <Christian.Straka.15.0010E3C9@uni-konstanz.de>
- NNTP-Posting-Host: quadostimpy.natinst.com
-
- In article <Christian.Straka.15.0010E3C9@uni-konstanz.de>,
- Christian.Straka@uni-konstanz.de (Christian Straka) wrote:
-
- > The pow() and powl() function in <math.h> doesn't work properly. The
- following
- > example causes a DOMAIN error exception (see defs in math.h):
- >
- > pow(-1,1.1);
-
- (-1)^1.1 = (-1)^(11/10) = ((-1)^11)^(1/10) = (-1)^(1/10) = imaginary
-
- In English: taking the 1.1th power of -1 is equivalent to taking the 10th
- root of -1. The 10th root of -1 is an imaginary number.
-
-
- Roger
-
- ---
-
- Roger L. Cauvin
- rcauvin@natinst.com
- Software Engineer
- National Instruments
-